
package com.cmc.service.impl;

import java.util.List;

import com.cmc.service.impl.BaseManager;
import com.cmc.model.SystemCharacter;
import com.cmc.dao.SystemCharacterDao;
import com.cmc.service.SystemCharacterManager;

public class SystemCharacterManagerImpl extends BaseManager implements SystemCharacterManager {
    private SystemCharacterDao dao;

    /**
     * Set the Dao for communication with the data layer.
     * @param dao
     */
    public void setSystemCharacterDao(SystemCharacterDao dao) {
        this.dao = dao;
    }

    /**
     * @see com.cmc.service.SystemCharacterManager#getSystemCharacters(com.cmc.model.SystemCharacter)
     */
    public List getSystemCharacters(final SystemCharacter systemCharacter) {
        return dao.getSystemCharacters(systemCharacter);
    }

    /**
     * @see com.cmc.service.SystemCharacterManager#getSystemCharacter(String id)
     */
    public SystemCharacter getSystemCharacter(final String id) {
        return dao.getSystemCharacter(new Long(id));
    }

    /**
     * @see com.cmc.service.SystemCharacterManager#saveSystemCharacter(SystemCharacter systemCharacter)
     */
    public void saveSystemCharacter(SystemCharacter systemCharacter) {
        dao.saveSystemCharacter(systemCharacter);
    }

    /**
     * @see com.cmc.service.SystemCharacterManager#removeSystemCharacter(String id)
     */
    public void removeSystemCharacter(final String id) {
        dao.removeSystemCharacter(new Long(id));
    }
}
